<%@ page language="java" pageEncoding="UTF-8" buffer="16kb"%>
<%@ include file="/base.jsp"%>
<%@ include file="/module/taglibs.jsp"%>
<%@ include file="/module/nocache.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<%@ include file="/module/js.jsp"%>
<%@ include file="/module/orderField.jsp"%>
 
<style>

table label.error {
    margin-left: 5px;
    width: auto;
    display: inline;
    color: red;
}
</style>







</head>
<body>
     <form action="#" name="Form" id="Form" method="post">
           <input type="hidden" name="states" id="states"  value="0"/>
           <input type="hidden" name="bjid" id="bjid"  value="${student.bjid}"/>
           <input type="hidden" name="stuid" id="stuid"  value="${student.xsid}"/>
		   	<table cellpadding="0" cellspacing="0" border="0" class="table-border" width="95%">
			<tr>
				<td class="table-header" colspan="6">助学金申请</td>
			</tr>
			<tr>
				<td class="table-titleTD" style="width: 12%">姓名：</td>
				<td class="table-contentTD" style="width: 21%">${student.xm}</td>
				<td class="table-titleTD"  style="width: 12%">学号：</td>
				<td class="table-contentTD" style="width: 21%">${student.xh}</td>
				<td class="table-titleTD" style="width: 12%">性别：</td>
				<td class="table-contentTD" style="width: 22%">${student.xb}</td>
			</tr>
			<tr>
				<td class="table-titleTD">班级：</td>
				<td class="table-contentTD">${student.bjmc}</td>
				<td class="table-titleTD">专业：</td>
				<td class="table-contentTD">${student.zymc}</td>
				<td class="table-titleTD">年级：</td>
				<td class="table-contentTD">${student.njmc}</td>
			</tr>
			
			<tr>
				<td class="table-titleTD"><font style="color: red;">*</font>民族：</td>
				<td class="table-contentTD"><select id="mz" name="mz"  class="selectList required">
						<option value="">请选择</option>
							 <c:forEach items="${nationList}" var="code">
								<option value="${code.codename}">${code.codename}</option>
							</c:forEach>
				</select></td>
				<td class="table-titleTD">出生日期：</td>
				<td class="table-contentTD">${student.csrq1}</td>
				<td class="table-titleTD">入学日期：</td>
				<td class="table-contentTD"><fmt:formatDate value="${student.rxrq}" pattern="yyyy-MM-dd"/> </td>
			</tr>
			
			<%-- <tr>
			  <td class="table-titleTD" colspan="6" style="text-align: left;">家庭成员情况：</td>
			</tr>
			
					<tr>
						<td class="table-titleTD" colspan="2" style='text-align: center;'>姓名</td>
						<td class="table-titleTD"  style='text-align: center;'>年龄</td>
						<td class="table-titleTD" style='text-align: center;'>与本人关系</td>
					    <td class="table-titleTD"  colspan="2"  style='text-align: center;'>工作或学习单位</td>
					</tr>
					
				   <c:choose>
						<c:when test="${not empty familyList}"> 
						    	<c:forEach items="${familyList}" var="family">
							      <tr>
										<td class="table-contentTD"  colspan="2"style='text-align: center;'>${family.xm}</td>
										<td class="table-contentTD" style='text-align: center;'>${family.age}</td>
										<td class="table-contentTD"  style='text-align: center;'>${family.gx}</td>
										<td class="table-contentTD"  colspan="2" style='text-align: center;'>${family.gzdw}</td>
								   <tr>
									
							 </c:forEach>
						</c:when>
							<c:otherwise>  
                               <tr>
							        <td class="table-titleTD" colspan="6" style="text-align: center;">无家庭成员信息</td>
							    </tr>	
							</c:otherwise> 
					</c:choose>  --%>
					
			    <tr>
				<td class="table-titleTD">家庭成员：</td>
				<td colspan="5">
				   <table cellpadding="0" cellspacing="0" border="0" class="table-border" width="100%">
					  <tr>
						<td class="table-titleTD"  style='text-align: center;'>姓名</td>
						<td class="table-titleTD"  style='text-align: center;'>年龄</td>
						<td class="table-titleTD"  style='text-align: center;'>与本人关系</td>
					    <td class="table-titleTD"  colspan="2"  style='text-align: center;'>工作或学习单位</td>
					   </tr>
					   
					     <c:choose>
						<c:when test="${not empty familyList}"> 
						    	<c:forEach items="${familyList}" var="family">
							      <tr>
										<td class="table-contentTD" style='text-align: center;'>${family.xm}</td>
										<td class="table-contentTD" style='text-align: center;'>${family.age}</td>
										<td class="table-contentTD"  style='text-align: center;'>${family.gx}</td>
										<td class="table-contentTD"  colspan="2" style='text-align: center;'>${family.gzdw}</td>
								   <tr>
									
							 </c:forEach>
						</c:when>
							<c:otherwise>  
                               <tr>
							        <td class="table-titleTD" colspan="5" style="text-align: center;">无家庭成员信息</td>
							    </tr>	
							</c:otherwise> 
					    </c:choose> 
			       </table>
				</td>
			</tr>
					
			  <tr>
					<td class="table-titleTD"><font style="color: red;">*</font>户籍性质：</td>
					<td class="table-contentTD"> 
					  <input type="radio" value="农业户口"  name="hjxz"  <c:if test="${student.hkxz=='农业户口'}">checked="checked"</c:if>/>农业户口
					  <input type="radio" value="非农业户口" name="hjxz" <c:if test="${student.hkxz=='非农业户口' ||student.hkxz=='' ||student.hkxz==null }">checked="checked"</c:if>/>非农业户口
			    </td>
				<td class="table-titleTD"><font style="color: red;">*</font>主要收入来源:</td>
				<td class="table-contentTD">
				<input type="text" name="zysrly" id="zysrly" placeholder="主要收入来源"  class="inputText required"  autocomplete="off"/>
				</td>
				<td class="table-titleTD"><font style="color: red;">*</font>联系电话:</td>
				<td class="table-contentTD">	
				<input type="text" name="lxdh" id="lxdh" placeholder="联系电话"  class="inputText required"  autocomplete="off"/> 
				</td>
			 </tr>
			 
			 
			  <tr>
				<td class="table-titleTD"><font style="color: red;">*</font>家庭年收入:</td>
				<td class="table-contentTD">
				<input type="text" name="jtnsr" id="jtnsr" placeholder="家庭年收入"  class="inputText required"  maxlength="40" autocomplete="off"/>
				</td>
				<td class="table-titleTD"><font style="color: red;">*</font>人均年收入:</td>
				<td class="table-contentTD">	
				<input type="text" name="rjnsr" id="rjnsr" placeholder="人均年收入" class="inputText required"  maxlength="40" autocomplete="off"/> 
				</td>
				  <td class="table-titleTD"><font style="color: red;">*</font>是否因病因灾:</td>
				  <td class="table-contentTD">	
				     <input type="radio" value="true" name="sfybyz" />是
				     <input type="radio" value="false" checked="checked"  name="sfybyz"/>否
				  </td>
			 </tr>
			 
			   <tr>
				<td class="table-titleTD"><font style="color: red;">*</font>家庭地址:</td>
				<td class="table-contentTD" colspan="3">
			    	<input type="text" name="jtdz" id="jtdz" placeholder="家庭地址" value="${student.jtdz}" style="width: 98%" class="inputText required"  maxlength="40"  autocomplete="off"/>
				</td>
				<td class="table-titleTD"><font style="color: red;">*</font>邮政编码:</td>
				<td class="table-contentTD">	
				<input type="text" name="yzbm" id="yzbm" placeholder="邮政编码" value="${student.yzbm}"  maxlength="40" class="inputText required"  autocomplete="off"/> 
				</td>
			 </tr>
			<tr>
				<td class="table-titleTD"><font style="color: red;">*</font>申请助学金理由:</td>
				<td class="table-contentTD" colspan="6" style="width: 100%"><textarea  style="width: 90%;height: 80px;" name="sqly"  class="required required"   autocomplete="off" placeholder="申请助学金理由" id="sqly" maxlength="500" ></textarea></td>
			</tr>
		</table>
		
		 </form> 
		<br />
		
		<table cellpadding="1" cellspacing="1" border="0" align="left">
			<tr>
			    <td><input type="button" id="btnSave" class="inputButton"  autocomplete="off" 
					style="text-align: center;" value="保存" /></td>
				<td><input type="button" id="btnSaveContinue" class="inputButton" autocomplete="off" 
					style="text-align: center;" value="保存并新增" /></td>
				<td><input type="button" id="Cancel" class="inputButton" autocomplete="off"
					style="text-align: center;" value="取消" /></td>
				<td><input type="button" id="returnBut" class="inputButton" autocomplete="off"
					value="返回" style="text-align: center;" /></td>
			</tr>
		 </table>
		
		 
			
		<script>
			$(document).ready(function() {
				var _form=$("#Form").validate();
				$("#btnSave").click(function() {
					if(_form.form()){
						
						validataSave();
					}
				});
				
				$("#btnSaveContinue").click(function() {
					if(_form.form()){
						  validataSaveContinue();
					}
				});
				
				function validataSave(){
				 
								   document.Form.action ="${basePath}/zxjStudentNationalGrant/add";
									document.Form.submit();
							
				}
				
				
				function validataSaveContinue(){
								    document.Form.action ="${basePath}/zxjStudentNationalGrant/addSaveContinue";
									document.Form.submit();  
				}
				
				$("#returnBut").click(function() {
		 			   window.location.href='${basePath}/zxjStudentNationalGrant/index';
		 		});
				
				$("#Cancel").click(function() {
					   window.location.href = "${basePath}/zxjStudentNationalGrant/addInInt";
		 		});
			});
			
			   if("${msg}"!=""){
			       layer.alert("${msg}", {icon: 6});
			  } 
			   
	
	      compareListValue(document.getElementById('mz'),'${student.mz}');
			
		</script>
</body>
</html>
